import { View } from '@tarojs/components';
import styles from './index.scss';
import { Button } from '@nutui/nutui-react-taro';

type Props = {
  top: React.ReactNode;
  middle: React.ReactNode;
  hasBtn?: boolean;
  handleClick?: () => void;
};
export default ({ top, middle, hasBtn, handleClick }: Props) => {
  return (
    <View className={styles.container}>
      <View className={styles.top}>{top}</View>
      <View className={styles.middle}>{middle}</View>
      {hasBtn && (
        <Button className={styles.btn} onClick={handleClick}>
          立即查看
        </Button>
      )}
    </View>
  );
};
